package app.backend.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 微信小程序端用户表
 * </p>
 *
 * @author 作者
 * @since 2022-08-16
 */
@Getter
@Setter
@TableName("app_client_user")
public class AppClientUser {

    /** id */
    @TableId("id")
    private String id;

    @TableField("phone")
    private String phone;

    @TableField("nickname")
    private String nickname;

    @TableField("avatar")
    private String avatar;

    @TableField("openid")
    private String openid;

    @TableField("role")
    private String  role;

    @TableField("login_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime loginTime;

    @TableField("delete_flag")
    private String deleteFlag;

    /** 创建时间 */
    @TableField("create_time")
    private Date createTime;

    @TableField(exist = false)
    private String token;

}
